package org.xteam.sled.tree;

import java.util.List;

import org.xteam.sled.model.AbsoluteField;
import org.xteam.sled.tree.TreeBuilder.SplitResult;

public class NoMatchHeuristic extends Heuristic {

	public NoMatchHeuristic() {
		super("nomatch");
	}

	@Override
	public int run(TreeBuilder treeBuilder, List<SplitResult> children,
			AbsoluteField f) {
		for (SplitResult res : children) {
			if (res.arms.isEmpty())
				return ~1;
		}
		return 0;
	}

}
